<template>
    <div clas="userinfo">
        <navbar></navbar>
        <img src="@/assets/bannerTop_new.png" class="backImg">
        <user-detail :userinfo="model"></user-detail>

    </div>
</template>

<script>
    import Navbar from "../components/common/Navbar";
    import userDetail from "../components/userComponent/userDetail";
    export default {
        name: "userinfo",
        components: {
            userDetail,
            Navbar
        },
        data(){
            return{
                model:{}
            }
        },
        created() {
            this.Userinfodata()
        },
        methods: {
            async Userinfodata() {
                const res = await this.$http.get('/user' + localStorage.getItem('id'),{
                    headers:{
                        'Authorization':'Bearer ' + localStorage.getItem('token')
                    }
                })
                this.model = res.data
            }
        }
    }
</script>

<style scoped>
    .userinfo{

    }
    .backImg{
        height: 70px;
    }

</style>